<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:f="http://xmlns.jcp.org/jsf/core">

    <rich:column sortBy="#{property}" sortOrder="#{bean.sortOrders[property]}"
                 filterExpression="#{property}" filterValue="#{bean.filterValues[property]}" >

        <f:facet name="header">
            <h:outputText styleClass="arrangeableHeader" 
                          value="#{empty columnTitleKey ? bundle[property] : bundle[columnTitleKey]}" />
            <br />
            <h:outputLabel value="#{bundle.columnSortingLabel}" 
                           rendered="${sortingEnabled}" />
            <h:commandLink action="#{bean.toggleSort}" style="color: #ffffff;" 
                           rendered="${sortingEnabled}">
                #{bean.getLocalizedSortOrderText(property)}
                <a4j:ajax render="#{tableID}" />
                <f:setPropertyActionListener target="${bean.sortProperty}" value="#{property}" />
            </h:commandLink>
            <br />
            <h:inputText value="#{bean.filterValues[property]}" rendered="${filteringEnabled}" >
                <a4j:ajax render="#{tableID}@body #{scrollerID}" event="keyup" />
            </h:inputText>
        </f:facet>

        <rich:tooltip showDelay="1500" rendered="#{not empty tooltipText}" >#{tooltipText}</rich:tooltip>

        <h:outputText value="#{columnValue}" />
    </rich:column>
</ui:composition>

